<div class="breadcrumbs" id="breadcrumbs">
	<ul class="breadcrumb">
		<li><i class="icon-home home-icon"></i><a href="#">Home</a></li>
		<li class="current">Departments</li>
	</ul>
	<script type="text/javascript">
		try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
	</script>
</div>
<?php
// $this->breadcrumbs=array(
	// 'Departments',
// );

// Yii::app()->clientScript->registerScript('search', "
// $('.search-button').click(function(){
    // $('.search-form').slideToggle('fast');
    // return false;
// });
// $('.search-form form').submit(function(){
    // $.fn.yiiGridView.update('departments-grid', {
        // data: $(this).serialize()
    // });
    // return false;
// });
// ");

?>
<div class="col-xs-12">
	<div class="page-content">
		<div class="page-header">
			<div class="clearfix">
				<div class="pull-left">
					<h1>
						Departments
					</h1>
				</div>
			</div>
		</div>
		<?php 
			$this->beginWidget('zii.widgets.CPortlet', array(
				'htmlOptions'=>array(
					'class'=>''
				)
			));
			$this->widget('bootstrap.widgets.TbMenu', array(
				'type'=>'pills',
				'items'=>array(
					array('label'=>'Create', 'icon'=>'icon-plus', 'url'=>Yii::app()->controller->createUrl('create'), 'linkOptions'=>array()),
					array('label'=>'List', 'icon'=>'icon-th-list', 'url'=>Yii::app()->controller->createUrl('index'),'active'=>true, 'linkOptions'=>array()),
					// array('label'=>'Search', 'icon'=>'icon-search', 'url'=>'#', 'linkOptions'=>array('class'=>'search-button')),
					// array('label'=>'Export to PDF', 'icon'=>'icon-download', 'url'=>Yii::app()->controller->createUrl('GeneratePdf'), 'linkOptions'=>array('target'=>'_blank'), 'visible'=>true),
					// array('label'=>'Export to Excel', 'icon'=>'icon-download', 'url'=>Yii::app()->controller->createUrl('GenerateExcel'), 'linkOptions'=>array('target'=>'_blank'), 'visible'=>true),
				),
			));
			$this->endWidget();
		?>
		<div class="col-xs-12">
			<div class="widget-box">
				<div class="widget-header header-color-blue">
					<h5 class="bigger lighter">
						<i class="icon-table"></i>
						Departments Tables.
					</h5>
				</div>

				<div class="widget-body">
					<div class="widget-main no-padding">
						<?php $this->widget('bootstrap.widgets.TbGridView',array(
							'id'=>'departments-grid',
							'dataProvider'=>$model->search(),
								'type'=>'striped bordered condensed',
								'template'=>'{summary}{pager}{items}{pager}',
								'columns'=>array(
								// 'id',
								array(
									'header'=>'No.',
									'value'=>'$this->grid->dataProvider->pagination->currentPage * $this->grid->dataProvider->pagination->pageSize + ($row+1)',
								  ),
								'department_code',
								'name',
								'note',
							   array(
									'class'=>'bootstrap.widgets.TbButtonColumn',
									'template' => '{view} {update} {delete}',
									'buttons' => array(
										  'view' => array(
											'label'=> 'View',
											'options'=>array(
												'class'=>'btn btn-small view'
											)
										),	
													  'update' => array(
											'label'=> 'Update',
											'options'=>array(
												'class'=>'btn btn-small update'
											)
										),
										'delete' => array(
											'label'=> 'Delete',
											'options'=>array(
												'class'=>'btn btn-small delete'
											)
										)
									),
									'htmlOptions'=>array('style'=>'width: 150px'),
								   )
							),
						)); ?>
					</div>
				</div>
			</div>
		</div><!-- /span -->
		
	</div>
</div>

<div class="search-form" style="display:none">
<?php 
// $this->renderPartial('_search',array(
	// 'model'=>$model,
// )); 
?>
</div><!-- search-form -->




